/**
 * 
 */
package com.cyou.qb.common.service.mock;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Component;

import com.cyou.nad.datastore.query.JdbcPage;
import com.cyou.nad.utils.DateUtils;
import com.cyou.qb.common.domain.AssignedWinner;
import com.cyou.qb.common.domain.Award;
import com.cyou.qb.common.domain.Winner;
import com.cyou.qb.common.domain.WinnerContract;
import com.cyou.qb.common.domain.WinnerEx;
import com.cyou.qb.common.service.WinnerService;
import com.cyou.qb.system.ServiceContext;

/**
 * @author zoudongchao
 *
 */
@Component("WinnerServiceMock")
public class WinnerServiceMock implements WinnerService {

	private Winner newOneWinner(int id, int awardId, int activeId, int uCenterId, String passport, String nickname,
			Date winTime) {
		Winner winner = new Winner();
		winner.setId(id);
		winner.setActiveId(activeId);
		winner.setuCenterId(uCenterId);
		winner.setPassport(passport);
		winner.setNickname(nickname);
		winner.setWinTime(winTime);
		winner.setCreateDate(new Date());

		return winner;
	}

	public List<Winner> findWinner(int awardId, int activeId, Date startTime, Date endTime) {
		List<Winner> list = new ArrayList<Winner>();

		list.add(this.newOneWinner(1, awardId, activeId, 1, "zoudongchao@changyou-inc.com", "tinkerz",
						new Date()));

		return list;
	}

	

	@Override
	public void saveOneWinner(Winner winner) {
	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.service.BaseService#setServiceContext(com.cyou.qb.system.ServiceContext)
	 */
	@Override
	public void setServiceContext(ServiceContext serviceContext) {

	}

	/* (non-Javadoc)
	 * @see com.cyou.qb.service.BaseService#getServiceContext()
	 */
	@Override
	public ServiceContext getServiceContext() {
		return null;
	}

	@Override
	public List<WinnerEx> findTopWinnerByActive(int activeId, int size) {
		return null;
	}

	@Override
	public JdbcPage pageWinnerDraw(int uCenterId, int pageNo, int pageSize) {
		return null;
	}

	@Override
	public int saveWinnerContract(WinnerContract contract) {
		return 0;
	}

	@Override
	public void freeServiceContextContext() {
		// TODO Auto-generated method stub
		
	}
}
